
import axios from 'axios';

/**
 * 设备用户关联表
 */
export class DeviceCatUserService {
    // 分页查询列表
    static findDeviceCatUsers (queryParams) {
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/findDeviceCatUsers',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的设备用户关联表
    static findDeviceCatUser (deviceCatUserId) {
        const query = {
            deviceCatUserId
        }
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/findDeviceCatUser',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的设备用户关联表(包含外键名称)
    static findDeviceCatUserForView (deviceCatUserId) {
        const query = {
            deviceCatUserId
        }
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/findDeviceCatUserForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的设备用户关联表(包含外键名称)
    static findDeviceCatUserForEdit (deviceCatUserId) {
        const query = {
            deviceCatUserId
        }
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/findDeviceCatUserForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的设备用户关联表(只提取ID 和 Name)
    static findDeviceCatUsersWithIdNameById (deviceCatUserId) {
        const query = {
            deviceCatUserId
        }
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/findDeviceCatUsersWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询设备用户关联表集合(只提取ID 和 Name)
    static findDeviceCatUsersWithIdNameByName (deviceCatUserName) {
        const query = {
            deviceCatUserName
        }
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/findDeviceCatUsersWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存设备用户关联表
    static saveDeviceCatUser (deviceCatUser) {
        const query = {}
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/saveDeviceCatUser',
            method: 'POST',
            params: query,
            data: deviceCatUser
        });
    }

    //修改保存设备用户关联表
    static updateDeviceCatUser (deviceCatUser) {
        const query = {}
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/updateDeviceCatUser',
            method: 'POST',
            params: query,
            data: deviceCatUser
        });
    }

    //根据ID查询指定的设备用户关联表(只提取ID 和 Name)
    static deleteDeviceCatUser (deviceCatUserId) {
        const query = {
            deviceCatUserId
        }
        return axios({
            url: '/repair/repairManagement/DeviceCatUser/deleteDeviceCatUser',
            method: 'POST',
            params: query,
        });
    }
}
